1. Field of the Invention
The present invention generally relates to methods of constructing a hierarchical-structure menu system, and particularly relates to a method of constructing definition files for a hierarchical-structure menu system. Also, the present invention relates to a structure of such definition files and a device whose operations are based on the hierarchical-structure menu system constructed by the above method.
The method of constructing definition files according to the present invention makes it easier to create and modify menus having a hierarchical structure. Such menus enable users to execute programs by selecting a program in a displayed menu through a conversation-style interaction with a personal computer. Thus, users who are not familiar with personal computers can easily use such a menu system.
Hierarchical-structure menu systems are commonly employed in information processing systems so as to enable users to select a program from a list of programs and easily execute it. Such systems are disclosed, for example, in Japanese Laid-Open Patent Application No.61-82228, No.61-16317, and No.62-293339.
In such a hierarchical-structure menu system, as the number of items in a menu and/or the number of hierarchy levels grow, definition files defining contents shown in a menu display become complicated. This leads to a difficulty for users in creating and modifying the definition files. Thus, a set of rules of writing definition files needs to be simplified to reduce the work load on users in creating and modifying the definition files.
Depending on the application fields of menu displays, a menu system has to carry out other processes in addition to the execution of a selected item from the menu. Such processes include a password check, confirmation on the execution of the selected item, and establishing a connection of a communication line before executing the selected item. Also, there may be a need for changing a next process to be executed depending on a result of the execution of the selected item. Or a communication line which has been established with regard to a present menu display may need to be disconnected before returning to a previous menu display. Accordingly, a menu system which can satisfy the various needs as described above is required.
2. Description of the Prior Art
In a typical hierarchical-structure menu system of the prior art, a single definition file defines a list of items shown in a menu display as well as processes to be executed when those items are selected.
FIG. 1 shows an example of a hierarchical structure of a menu system of the prior art, and FIG. 2 shows a definition file for the menu system. As shown in FIG. 1, the hierarchical-structure menu system has a first menu display listing items `OASYS`, `SOFTWARE DEVELOPMENT`, `OA FUNCTION`, and `SHUTDOWN`. When the item `OASYS` is selected, for example, a word-processor program, OASYS.EXE, is executed. When the item `SOFTWARE DEVELOPMENT` is selected, for example, a second display menu shows a list of items `RED`, `YPS`, and `ECOLOGY`, which are further detailed descriptions of `SOFTWARE DEVELOPMENT`. In this manner, selecting a menu item which has sublevel menu items results in the display of the sublevel menu items, and selecting a menu item which does not have a sublevel results in the execution of that menu item.
In FIG. 2, the definition file defining the hierarchical structure of the menu system of FIG. 1 has a list of the items displayed in menu displays. In order to discriminate sublevel menus from the first level menu, sublevel items are listed with indentations of four characters on a next line of the pertinent item. Those indentations signify the fact that those items are sublevel items. For example, if the item `SOFTWARE DEVELOPMENT` is the highest level menu item, the sublevel menu items `RED`, `YPS`, and `ECOLOGY` are listed with four character indentations. Further, `YPS EDITOR`, `YPS/C COMPILER`, and `PRINT` which are sublevel items of the item `YPS` are listed with four character indentations on the next line after the item `YPS`. With regard to an item which does not have any sublevel, an execution program for that item is listed after a colon `:` following that item on the same line.
In this method of defining menu items, it is clear which programs are defined in which menu items, as long as the numbers of menu items and hierarchy levels are small as in this example. However, as the number of menus grows, the definition file becomes too long to be simple and clear. Also, the number of characters which can be written on one line is limited (e.g., 80 characters), so that this limit restricts the depth (i.e., number of levels) of the hierarchical structure.
As described above, when a hierarchical-structure of menus is defined by a single definition file, the number of menu items and hierarchy levels are restricted. An attempt to include an excessively large number of definitions will require a complex set of grammar rules for the definitions used in a definition file.
As described above, there are cases in which some processes should be executed before executing a selected item, such processes including a password check, confirmation on execution, and establishment of a communication line. There is also a case in which a process needs to be executed before returning to a previous menu. In such cases, definitions of processes as well as menu items are all included in a menu program without using a definition file.
Using a menu program including menu items and processes as mentioned above is a second method of constructing a hierarchical-structure menu system.
FIG. 3 shows a flow chart of an exemplary processing of this menu program of the prior art. In this example, at a step S21, a selection is made with regard to a process to be carried out. At a step S22, a check is made whether the selection was made from listed items of the menu. If it was, the procedure goes to a step S23. At the step S23, one of the branches for the procedure is selected based on the selected item number. If the selected item is an item for executing a program, the pertinent program is executed to carry out a process 2 or a process 3 at a step S26 or a step S27. At a step S28, a current menu is displayed after the execution of that program. If predetermined programs such as a process A and a process B need to be executed before executing a program for the selected item, those predetermined programs are executed at a step S24. At a step S25, the program for the selected item is executed to carry out a process 1. At a step S28, the current menu is displayed after the completion of the process 1. If the selected item is an item for displaying a sublevel menu, the sublevel menu is displayed at a step S29 or a step S31. At a step S30 or S32, a further selection is made for a process to be carried out.
If it turns out at the step S22 that the selection was made at the step S21 for a process other than the listed items, the procedure goes to a step S33. Such a process may be selected by control code keys, function keys, etc., for selecting a return to a previous menu display, for selecting a help menu, and so on. At a step S33, one of branches are selected according to the selected key. If a key for returning to a previous menu display, for example, is selected, a process C which is necessary before returning to the previous menu is carried out at a step S34. Such a process includes the disconnection of the communication line which has been established for the current menu. Then, at a step S35, the previous menu is displayed.
As described in this example, there are cases where two processes (process A and process B) need to be carried out before the execution of the selected menu item, and where only one process (process C) needs to be carried out. The programs for those processes are incorporated in the menu program. Thus, when a user wishes to expand the variation of processes, the menu program needs to be modified. Also, since menus are incorporated in the menu program in this method, the hierarchical structure cannot be modified as easily as that of the method of using a definition file.
In the first method of the prior art, a hierarchical structure of a menu system is signified by indentations in a definition file. Thus, the numbers of menu items and hierarchy levels are limited by the size of the definition file. Increasing those numbers makes the set of grammar rules for the definition file become complicated so as to add an additional work load on users who create and modify the definition file. This means that the number of menus which can be increased practically has its limit.
In the second method of the prior art, processes necessary to be carried out before the execution of a selected item or before returning to a previous menu can be incorporated in the menu program. When the variations of the processes need to be increased or changed, however, the menu program itself has to be changed. The means that menus and menu items cannot be added or modified easily.
Accordingly, there is a need in the field of hierarchical-structure menu systems for a method of constructing a hierarchical-structure menu system which can construct a hierarchical structure with no restriction on the numbers of menu items and hierarchy levels. Also, there is a need for a method which allows an easy setup of processes necessary to be carried out before the execution of a selected item or before returning to a previous menu. Furthermore, there is a need for a device whose operations are based on a hierarchical-structure menu system constructed by the above methods.